
<?php include './application/views/top.php'; ?>
<script src="/static/js/gsdai.js"></script>
<script src="/static/js/ajaxfileupload.js"></script>
<script src="/static/js/My97DatePicker/WdatePicker.js"></script>
<script src="/static/js/formCheck.js"></script>

<div class="clear"></div>
<div class="user_bottom all"></div>
<div class="clear h50"></div>
<div class="layout uc">
	<?php include './application/views/user/left.php'; ?>
	<?php
		$sex = $v['sex'];
		$cardType = $v['cardType'];
	?>
	<div class="right">
		<div class="menu_list"><?php include './application/views/user/menu.php'; ?></div>
		<?php if($type == 3){?>
        <div class="seach">
		<form id="collForm" action="/userborrow/coll.html" method="get">
			开始时间：<input class="input" type="text" id="strtime" name="strtime" style="width: 100px;" value="<?php echo $where['strtime'];?>"  onfocus="WdatePicker()" readonly/>
			结束时间：<input class="input" type="text" id="endtime" name="endtime" style="width: 100px;" value="<?php echo $where['endtime'];?>"  onfocus="WdatePicker()" readonly/>
			<a href="javascript:void(0)" onclick="document.getElementById('collForm').submit();" class="ann">查询</a>
			<a href="/userborrow/coll.html?act=excel&strtime=<?php echo $where['strtime'];?>&endtime=<?php echo $where['endtime'];?>"  class="ann">导出</a>
		</form>
        </div>
        <?php }?>
        <div class="cont">
        	<ul class="tbt">
            	<li class="w168">标题</li>
                <li class="w120">期数/总期数</li>
				<?php if($type == 4){?>
                <li class="w120">收款时间</li>
                <li class="w120">已收本金</li>
                <li class="w120">已收利息</li>
                <?php }else{?>
                <li class="w120">应收时间</li>
                <li class="w120">应收本金</li>
                <li class="w120">应收利息</li>
				<?php }?>
                <?php if($type == 3){?>
                <li class="w150">逾期时间</li>
                <li class="w120 npr">逾期费用</li>
                <?php }elseif($type == 4){?>
                <li class="w150">逾期时间</li>
                <li class="w120 npr">逾期费用</li>
                <?php }?>
			</ul>
            <?php foreach($collection_list as $col){?>
        	<ul class="tbc">
            	<li class="w168"><a href="/borrow/obj/<?php echo $col['borrow_id'];?>.html"><?php echo $col['title'];?></a></li>
            	<li class="w120"><?php echo $col['forder']+1;?>/<?php echo $col['time_limit'];?></li>
                <?php if($type == 4){?>
                <li class="w120"><?php echo date('Y-m-d',$col['repay_yestime']);?></li>
                <li class="w120">&yen;<?php echo number_format($col['capital'],2);?>元</li>
                <li class="w120">&yen;<?php echo number_format($col['interest'],2);?>元</li>
                <?php }else{?>
                <li class="w120"><?php echo date('Y-m-d',$col['repay_time']);?></li>
                <li class="w120">&yen;<?php echo number_format($col['capital'],2);?>元</li>
                <li class="w120">&yen;<?php echo number_format($col['interest'],2);?>元</li>
                <?php }?>
                <?php if($type == 3){?>
                <?php $late_result = late_interest($col['repay_time'], $col['capital']>0?$col['capital']:$col['interest']);?>
                <li class="w150"><?php echo $late_result['late_days'];?>天</li>
                <li class="w120 npr">&yen;<?php echo number_format($late_result['late_interest'],2);?>元</li>
                <?php }elseif ($type == 4){?>
                <li class="w150"><?php echo $col['late_days'];?>天</li>
                <li class="w120 npr">&yen;<?php echo number_format($col['late_interest'],2);?>元</li>
                <?php }?>
			</ul>
        	<?php }?>
        </div>
        <div class="clear h30"></div>
        <div class="page">
            <div class="pagination">
            <?php echo $this->pagination->create_links();?>
            </div>
        </div>
	</div>
</div>
<div class="clear h50"></div>
<?php include "./application/views/footer.php";?>